<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%String contextPath = request.getContextPath();%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>渠县信息管理局平台服务端</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<script type="text/javascript"
	src="${pageContext.request.contextPath}/js/md5.js"></script>
	
<script type="text/javascript">
function registerStaff(){
	if(document.getElementById("title").value==""){
		alert("账号名称不能为空.");
		return false;
	}
	if(document.getElementById("userName").value==""){
		alert("登录用户名不能为空.");
		return false;
	}
	
	if(document.getElementById("password").value==""){
		alert("登录密码不能为空.");
		return false;
	}
	
	var hash = MD5(document.getElementById("password").value);
	document.getElementById("password").value = hash;    
	
	document.forms[0].action = "<%=contextPath%>/adminlogin/registerStaff.action"; 
	document.forms[0].submit();
	}
	

</script>
</head>
<body background="${pageContext.request.contextPath}/images/bg.png">
<form method="post" name="from1" id="from1">

<table>
					<tr height="40px">
						<td width="150px"><div style="color: #000000; font-weight: bold;">账号名称：</div></td>
						<td><input id="title" name="title" maxlength="16" type="text" style="width:200px; height:20px; padding-left:6px; font-size:12px;"/></td>
					</tr>
					<tr height="40px">
						<td width="150px"><div style="color: #000000; font-weight: bold;">登录用户名：</div></td>
						<td><input id="userName" name="userName" maxlength="16" type="text" style="width:200px; height:20px; padding-left:6px; font-size:12px;"/></td>
					</tr>
					<tr height="40px">
						<td  width="150px"><div style="color: #00000; font-weight: bold;">登 录 密  码：</div></td>
						<td><input id="password" name="password" maxlength="6" type="password" style="width:200px; height:20px; padding-left:6px; font-size:12px"/></td>
					</tr>
					
				</table>

<button onclick="registerStaff()">  提交注册信息     </button>
</form>

</body>
</html>

